<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
		<link rel="stylesheet" href="css/reset.css" />
		<title></title>
		<style type="text/css">
			html,
			body {
				width: 100%;
				height: 100%;
				position: relative;
				}
			.wrap {
				width: 100%;
				height: 100%;
				background-image: url(img/beijing3.png);
				background-repeat: no-repeat;
				background-size: 100% 100%;
				position: relative;
			}
			#zaiyici{
				width: 90%;
				height: 12%;
				position: absolute;
				top: 60%;
				left: 5%;
			}
			#zaiyici img{
				width: 100%;
				height: 100%;
			}
			#paihang{
				width: 90%;
				height: 12%;
				position: absolute;
				top: 70%;
				left: 5%;
			}
			#paihang img{
				width: 100%;
				height: 100%;
			}
			#paihangbang{
				display: none;
				position: absolute;
				z-index: 1;
				width: 100%;
				height: 100%;
				background-color: rgba(0,0,0,0.8);
			}
			#paihangbang1{
				width: 90%;
				height: 80%;
				position: absolute;
				top: 10%;
				left: 5%;
			}
			#paihangbang1 img{
				width: 100%;
				height: 100%;
			}
			#cha{
				position: absolute;
				top: 24%;
				right: 8%;
				width: 7%;
				height: 5%;
			}
			#cha img{
				width: 100%;
				height: 100%;
			}
			#paihangbang table{
				position: absolute;
				border-color: white;
				top: 40%;
				left: 5%;
				color: white;


			}
		</style>
	</head>
	<body>
		<div class="wrap">
			<div id="anniu">
				<div id="zaiyici">
					<a href="flycar.html"><img src="img/zaiyici.png"/></a>
				</div>
				<div id="paihang">
					<a href="###"><img src="img/chakan.png"/></a>
				</div>
			</div>
			<div id="paihangbang">
				<div id="paihangbang1">
					<img src="img/paihangbang.png"/>
				</div>
				<div id="cha">
					<img src="img/cha.png"/>

				</div>
				<table border="1px">
<!--					<th>id</th>-->
<!--					<th>用户名</th>-->
<!--					<th>密码</th>-->
<!--					<th>电话</th>-->
					<?php
					require_once "opensql.php";
					if ($_POST){
						$search=$_POST["search"];

					}else{
						$search="";

					}

					$sql="SELECT * FROM user WHERE username LIKE '%{$search}%'";
					$result=mysql_query($sql);
					while ($row=mysql_fetch_assoc($result)){
						echo "<tr>";
						foreach ($row as $key=>$item){
							echo "<td>";
							if ($key=="username"){
								echo str_replace($search,"<span style='color:red'>{$search}</span>",$item);
							}else{
								echo $item;
							}
							echo "</td>";
						}

						echo "</tr>";
					}
					?>
				</table>
			</div>
		</div>
	</body>
	<script src="js/jquery-2.1.3.min.js" type="text/javascript" charset="utf-8"></script>
	<script type="text/javascript">
		$("#paihang").on("click",function(){
			$("#paihangbang").css("display","block");
		});
		$("#cha").on("click",function(){
			$("#paihangbang").css("display","none");
		});
	</script>
</html>
